home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Universe Beyond
/
The Universe Beyond (Mindscape).ISO
/
setup
/
uninst.inf
< prev
Wrap
INI File
|
1996-08-27
|
6KB
|
206 lines
DefineVariables
Text [ProductName] := The Universe Beyond
Text [ProgGrpName] := The Universe Beyond
Text [ProductIniFile] := TUB.INI
Text [UnRegisterFile] := UTUB.RGS
Text [BitmapName] := UNINST.BMP
Number [Continue] := 1011
Text [AreYouSureText] := Are you sure you wish to completely remove the selected application and all its components?
Text [YES_text] := Yes
Text [NO_text] := No
Text [DelteingFilesText] := Please wait...
Logical [IsWinNT] := N
Logical [IsWin95] := N
Logical [IsWin31x] := N
EndDefineVariables
SetDefaultBitmap Off
SetInstallModeTo Install
SetTraceMode Off
SetExitConfirmationPrompt off
SetPopupBorderTo double
SetReplacementInquiry Off
If DriveIsCDROM [InstallFromDrive] ;; exit if run from CD.
SoLong
EndIf
If DriveIsRemote [InstallFromDrive]
SoLong
EndIf
ShowWindow Minimize
Do CheckIfWindows95
Do SetInstallDir
SetTopLineTo [ProductName] Uninstall
If [IsWin95]
Delay 1200
EndIf
ShowWindow Maximize
Do DisplayLogo
Do CheckIfSure
Dialog BlackOnLightGray
Uninstall complete.
EndDialog
UnloadBitmap 1
SoLong Quietly
Procedure CheckIfWindows95
If WIN32
If WindowsVersion >= 3.95
[IsWin95] := Y
Else
[IsWinNT] := Y ;; Windows NT
Endif
Else
[IsWin31x] := Y ;; Win 3.1
EndIf
EndProcedure
Procedure SetInstallDir
[Number1] := LengthOf [InstallFromDirectory]
DecrementNumber [Number1]
[String1] := SubstringOf [InstallFromDirectory] from Beginning to [Number1]
[InstallationDirectory] := [String1]
EndProcedure
Procedure DisplayLogo
[Number6] := (MaxX - 640)/2
[Number7] := (MaxY - 480)/2
If MaxY > 480
[Number7] := [Number7] -22 ;; try to match bmp placement to autoruns.
EndIf
If FileExists [InstallationDirectory]\[BitmapName]
SetBackgroundColor 0 0 0 0 0 0 ;; set to Black
LoadBitmap 1 [InstallationDirectory]\[BitmapName]
ShowBitmap 1 @xy([Number6],[Number7])
Else
SetBackgroundColor 0 0 64 0 0 255
EndIf
ShowWindow Maximize
EndProcedure
Procedure UNINSTALL
If DirectoryExists [InstallationDirectory]
TextBox BlackOnLightGray
[DelteingFilesText]
EndTextBox
If [IsWin95]
Run [InstallationDirectory]\REGISTRY.EXE [InstallationDirectory]\[UnRegisterFile]
Else
If FileExists [WindowsDirectory]\MINDSCPE.INI
ModifyTextFile [WindowsDirectory]\MINDSCPE.INI Quietly NoBackup
InSection [[ProductName]]
DeleteLine 3
DeleteLine 2
DeleteLine 1
DeleteSection [[ProductName]]
EndModifyTextFile
EndIf
EndIf
If DirectoryExists [InstallationDirectory]\MEDIA
DeleteFiles from [InstallationDirectory]\MEDIA
*.*
EndDeleteFiles
DeleteDirectory [InstallationDirectory]\MEDIA
EndIf
If DirectoryExists [InstallationDirectory]\THESKY\BMP
DeleteFiles from [InstallationDirectory]\THESKY\BMP
*.*
EndDeleteFiles
DeleteDirectory [InstallationDirectory]\THESKY\BMP
EndIf
If DirectoryExists [InstallationDirectory]\THESKY\DATA
DeleteFiles from [InstallationDirectory]\THESKY\DATA
*.*
EndDeleteFiles
DeleteDirectory [InstallationDirectory]\THESKY\DATA
EndIf
If DirectoryExists [InstallationDirectory]\THESKY\HELP
DeleteFiles from [InstallationDirectory]\THESKY\HELP
*.*
EndDeleteFiles
DeleteDirectory [InstallationDirectory]\THESKY\HELP
EndIf
If DirectoryExists [InstallationDirectory]\THESKY
DeleteFiles from [InstallationDirectory]\THESKY
*.*
EndDeleteFiles
DeleteDirectory [InstallationDirectory]\THESKY
EndIf
DeleteFiles from [InstallationDirectory]
*.*
EndDeleteFiles
DeleteDirectory [InstallationDirectory]
DeleteFiles from [WindowsDirectory]
[ProductIniFile]
EndDeleteFiles
If [IsWin95]
;; Remove Program Files\Mindscape Dir if empty.
If DirectoryExists C:\PROGRA~1\MINDSC~1
If DirectoryIsEmpty C:\PROGRA~1\MINDSC~1
ChangeDirectoryTo [InstallFromDrive]:\
DeleteDirectory C:\PROGRA~1\MINDSC~1
EndIf
EndIf
[String1] := [WindowsDirectory]\Start Menu\Programs\[ProgGrpName]
LFNGetShortPathName [String1] [String2]
If [String2] <> BlankString
ProgramManagerDDE
ShowGroup([ProgGrpName],2)
DeleteGroup([ProgGrpName])
EndProgramManagerDDE
EndIf
EndIf
If [IsWinNT]
ProgramManagerDDE
DeleteGroup([ProgGrpName])
EndProgramManagerDDE
EndIf
If [IsWin31x]
ProgramManagerDDE
ShowGroup([ProgGrpName],1)
DeleteGroup([ProgGrpName])
EndProgramManagerDDE
EndIf
EndIf
EndProcedure
Procedure CheckIfSure
DialogBox 200 60 UseHeader "The Universe Beyond" Returns [Continue] BlackOnLightGray ModalFrame
CText @xy(0,10) 200 70 [AreYouSureText]
DefPushButton @xy( 30, 35) 40 16 [YES_text] 1012
PushButton @xy(125, 35) 40 16 [NO_text] 1011
EndDialogBox
ClearScreen
If [Continue] = 1012
Else
SoLong
EndIf
ClearScreen
Do UNINSTALL
EndProcedure
Procedure DDENonFatalErrorTrap
;; Trap the dde error for ReplaceItem.
;; See Simple.Stf for more information on how to
;; use ProgramManager's DDENonFatalErrorTrap.
EndProcedure
EndScript